package cranim.graphics.models;

import cranim.graphics.Entity;

/**
 *
 * @author Benedikt
 */
public abstract class UnitModel extends Entity{
        
    public UnitModel(String ref,int x, int y, double scale) {
        super(ref, x, y, scale, 0);
    }
        
    public void move(double x){
        this.x += x;
    }
    
    public double getTargetAngle(UnitModel target){
        double deltaX = target.getX() - this.getX();
        double deltaY = target.getY() - this.getY();        
        double tanA = deltaY/deltaX;
        double alpha = Math.toDegrees(Math.atan(tanA));
        return alpha;
    }
    
    public abstract int[] getGunPosition();
    
    public abstract int getWeapon();

}
